package com.itany.book.conf;

import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SolrConfig {

    @Bean("solrClient")
    public HttpSolrClient solrClient(){
        return new HttpSolrClient.Builder("http://localhost:8080/solr/t_book")
                .withConnectionTimeout(10000).withSocketTimeout(10000).build();
    }
}
